/*          this creates an array of feed urls which will later be aggregated */ 
tmpColl = .array ~new 
= 0 
do until url = "end" 
PARSE PULL url 
if url = "end" 
then 
say over 
else 
do
= i + 1 
say i  
tmpColl[i] = url 
end 
end 

say "your urls are :" 
SAY tmpColl~string || ":" 
DO item OVER tmpColl 
SAY "[" || item || "]" 
END 


feed=.bsf~new("com.sun.syndication.feed.synd.SyndFeedImpl") 
/*      using syndfeedImpl to creat a feed using the independent object model */ 
feed~setFeedType(typet) 

feed~setTitle("Aggregated Feed") 
feed~setDescription("Anonymous Aggregated Feed") 
feed~setAuthor("Martin Stoppacher") 
feed~setLink("http://martinstoppacher.com") 
/*             create some entries for the feed by using the SyndFeed methods */ 

/*                       creates a Java array list for the entries of the feed*/ 
entries =.bsf~new("java.util.ArrayList") 

/*                                 sets the Java array as entries of the feed */ 
feed~setEntries(entries) 


/* this uses the URL array to retrieve the entries fro the feeds              */ 
/* and add them to the entries array                                          */ 
do y=to 1 by -1 
feedUrl=.bsf~new("java.net.URL",tmpColl~at(i)) 
input=.bsf~new("com.sun.syndication.io.SyndFeedInput") 
xmlr=.bsf~new("com.sun.syndication.io.XmlReader", feedUrl) 
infeed=input~build(xmlr) 
entries~addAll(infeed~getEntries()) 
end